EMT Practice Test

1. Question Content...


Question List

Question1: A Magento industry partner shipping provider has tasked you to build their integration module called MyCompany_ShippingProvider.
Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?

Question2: A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals.
Which two actions do you take to make sure the newsletter is sent? (Choose two.)

Question3: Which entity in Magento supports scoped attributes?

Question4: You are building a report using complex SQL aggregations to locate the required data.
In what type of class do you put these SQL statements?

Question5: A merchant gives you the module MyCompany_MyModule to install.
How do you identify which REST endpoints are supported by the module?

Question6: What is the difference between online and offline shipping methods?

Question7: What will be the result of calling the save() method on a collection instance?

Question8: You are building an tool that imports products from an ERP. There are 20 columns of additional information that are associated with each product. This extra information must also be associated with an update time to know when to refresh the data.
Keeping maintainability in mind, how do you build this into Magento?

Question9: A merchant tasks you to keep sales managers out of the system configuration backend pages.
How do you do that using the admin interface?

Question10: You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.
How do you do that?

Question11: How does Magento store customer address attribute values?

Question12: You need to find all orders in the processing state. You have written the code:

How do you resolve the exception?

Question13: A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?

Question14: A merchant asks you to create a module that is able to process URLs with a custom structure that can contain any combination of a product type code, a partial name, and a 4-digit year in any order. The request path will look like this: /product/:type-code/:name-part/:year.
Which layer in the Magento request processing flow is suited for this kind of customization?

Question15: Where do you change the frontName for the admin router?

Question16: You are reviewing a Magento module and see a directory named Service.
What can you determine from this directory's name?

Question17: A module you are developing requires the addition of new routes that should be accessible in the store front.
Where do you define your module's frontName?

Question18: You are creating a new page layout for your custom module.
What is the primary difference between container and block elements?

Question19: You need to control access to a custom controller action.
How do you tell Magento about this new control option?

Question20: What is the relationship between products and categories in Magento?

Question21: You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different depending on the selected language.
Keeping simplicity in mind, how do you add this attribute?

Question22: You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?

Question23: You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process.
Keeping in mind upgradeability, how is this done?

Question24: How many shipping addresses may be selected for an order during the checkout process?

Question25: You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12, $15.
What will be the result of the $product->getFinalPrice() call?

Question26: The module MyCompany_MyModule provides custom admin interface pages.
Access to these pages should only be granted to specific users.
You add the required configuration to the module's acl.xml file, but the setting does not seem to work as expected.
How do you visually check if Magento evaluates your ACL resource as expected?

Question27: What are two functions of a resource model? (Choose two.)

Question28: Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

Question29: You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing the default addColumn methods, what way is automatic?

Question30: You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?

Question31: The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in a grid.
You created a controller for this grid \MyCompany\MyModule\Controller\Adminhtml\CustomEntity\Index
Which two actions are required to make the new page accessible at the https://your.store.base.url/admin/my_module/custom_entity URL? (Choose two.)

Question32: You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.
In which file will the event observer be declared?

Question33: Assume that a customer's cart only includes one downloadable product.
What effect will it cause on the quote object?

Question34: As you are scanning folder in the vendor/module-catalog directory, you see a directory that is named Ui.
What is this folder's purpose?

Question35: Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?

Question36: You are updating a module to add extra functionality to the Magento application, Where would Magento look for modules?

Question37: The constructor function for \Magento\Catalog\Model\Category contains this excerpt:

With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?

Question38: You are working on a custom web API endpoint and have configured it in etc/webapi.xml.
This config is cached as part of the config_webservice cache type.
Keeping performance in mind, how do you refresh the cached version of this config using Magento CLI?

Question39: You have created a new product type, sample, and need to customize how it renders on the shopping cart page.
Keeping maintainability in mind, how do you add a new renderer?

Question40: Magento 2's architecture uses code to bootstrap a custom module that resides in app/code.
What two files are required to make a module usable? (Choose two.)

Question41: You are facing a bug, which is supposedly caused by the customization of \Magento\Catalog\Api\ProductRepositoryInterface::save().
To resolve the issue, you decide to find all logic which customizes this method.
Which two places do you search for customization declarations? (Choose 2)

Question42: Your module adds a new controller class which will return a JSON response.
What will be the return type of the execute method?

Question43: In layout files you can change al element's order on a page.
This can be done using one of the following:
* <move> instruction
* before and after element attributes?
How are two methods different?